package com.icare.shop.server;

import com.google.common.cache.Cache;
import com.google.common.cache.CacheBuilder;
import com.icare.shop.server.config.MyClassLoader;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import org.springframework.web.bind.annotation.RestController;
import sun.misc.IOUtils;

import javax.annotation.PostConstruct;
import java.io.File;
import java.io.FileInputStream;
import java.io.InputStream;
import java.lang.reflect.Method;

/**
 * <pre>
 *    author  : tianhaibo
 *    email   : tianhaibo@jshuii.com
 *    time    : 2020/3/12   17:11
 *    desc    :
 *    version : v1.0
 * </pre>
 */
@EnableFeignClients//此注解是控制是否开启feign远程调用功能
//@EnableDiscoveryClient//此注解时springcloud提供的，它能支持eureka,consul,zookeeper
@SpringBootApplication(
        scanBasePackages = {"com.icare.shop.server","com.icare.common"}
)
//@EnableHystrix
//@EnableHystrixDashboard
@RestController
@EnableTransactionManagement
@EnableAsync
//@EnableEurekaClient//是专门针对eureka注册中心使用的注解，控制是否向注册中心注册自己
public class Application {

    @Autowired
    private StringRedisTemplate redisTemplate;

    public static void main(String[] args) {
        SpringApplication.run(Application.class,args);
    }

}
